//
//  ViewController.m
//  27_Block_播放按钮
//
//  Created by 徐昊 on 16/8/19.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "ViewController.h"
#import "PlayView.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet PlayView *playView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"{1B13CD84-A66C-7E19-8E05-073C4C1787B6}"]];
    [self.playView play:^(UIButton *play) {
        
        NSLog(@"播放");
        play.backgroundColor = [UIColor yellowColor];
    } pause:^(UIButton *pause) {
        
        NSLog(@"暂停");
        pause.backgroundColor = [UIColor clearColor];
    }];
    [self.playView next:^(UIButton *next) {
        NSLog(@"下一曲");
        
    }];
    [self.playView last:^(UIButton *last) {
        NSLog(@"上一曲");
        
    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
